Optimal. Leaf size=214 \[ \frac {(A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{2 d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {(2 m+1) (-B+i A) \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{a d}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.63, antiderivative size = 214, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3596, 3601, 3564, 135, 133, 3599, 67, 65} \[ \frac {(A-i B) \sqrt {1+i \tan (c+d x)} \tan ^{m+1}(c+d x) F_1\left (m+1;\frac {1}{2},1;m+2;-i \tan (c+d x),i \tan (c+d x)\right )}{2 d (m+1) \sqrt {a+i a \tan (c+d x)}}+\frac {(2 m+1) (-B+i A) \sqrt {a+i a \tan (c+d x)} \tan ^m(c+d x) (-i \tan (c+d x))^{-m} \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};i \tan (c+d x)+1\right )}{a d}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 67
Rule 133
Rule 135
Rule 3564
Rule 3596
Rule 3599
Rule 3601
Rubi steps
\begin {align*} \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{\sqrt {a+i a \tan (c+d x)}} \, dx &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {\int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-a (A m+i B (1+m))+\frac {1}{2} a (i A-B) (1+2 m) \tan (c+d x)\right ) \, dx}{a^2}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) \int \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)} \, dx}{2 a}-\frac {((A+i B) (1+2 m)) \int \tan ^m(c+d x) (a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)} \, dx}{2 a^2}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(a (i A+B)) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {a+x} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{2 d}-\frac {((A+i B) (1+2 m)) \operatorname {Subst}\left (\int \frac {x^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{2 d}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {\left ((A+i B) (1+2 m) (-i \tan (c+d x))^{-m} \tan ^m(c+d x)\right ) \operatorname {Subst}\left (\int \frac {(-i x)^m}{\sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{2 d}+\frac {\left (a (i A+B) \sqrt {1+i \tan (c+d x)}\right ) \operatorname {Subst}\left (\int \frac {\left (-\frac {i x}{a}\right )^m}{\sqrt {1+\frac {x}{a}} \left (-a^2+a x\right )} \, dx,x,i a \tan (c+d x)\right )}{2 d \sqrt {a+i a \tan (c+d x)}}\\ &=\frac {(A+i B) \tan ^{1+m}(c+d x)}{d \sqrt {a+i a \tan (c+d x)}}+\frac {(A-i B) F_1\left (1+m;\frac {1}{2},1;2+m;-i \tan (c+d x),i \tan (c+d x)\right ) \sqrt {1+i \tan (c+d x)} \tan ^{1+m}(c+d x)}{2 d (1+m) \sqrt {a+i a \tan (c+d x)}}+\frac {(i A-B) (1+2 m) \, _2F_1\left (\frac {1}{2},-m;\frac {3}{2};1+i \tan (c+d x)\right ) (-i \tan (c+d x))^{-m} \tan ^m(c+d x) \sqrt {a+i a \tan (c+d x)}}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F] time = 180.00, size = 0, normalized size = 0.00 \[ \text {\$Aborted} \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.63, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {\sqrt {2} {\left ({\left (A - i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + A + i \, B\right )} \left (\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{m} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (-i \, d x - i \, c\right )}}{2 \, a}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{\sqrt {i \, a \tan \left (d x + c\right ) + a}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 3.93, size = 0, normalized size = 0.00 \[ \int \frac {\left (\tan ^{m}\left (d x +c \right )\right ) \left (A +B \tan \left (d x +c \right )\right )}{\sqrt {a +i a \tan \left (d x +c \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )}{\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}}{\sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________